home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 049a / kqdup101.zip / DSZ.BAT < prev    next >
DOS Batch File  |  1991-11-05  |  2KB  |  36 lines

  1. :This batch file is intended to be used by a sysop running a BBS with a
  2. :QWK compatible mail door. It will scan the REP packets right after they've
  3. :been uploaded by the users to eliminate dupes.
  4. :It will most likely require editing to match your environment.
  5.  
  6. :This batch file will work best if called "DSZ.BAT" and placed in the same
  7. :subdirectory as where your mail door runs in. Be certain the real DSZ
  8. :program is not in this same subdirectory. The mail door will attempt
  9. :to run DSZ, but this batch file will intercept the request, run the real
  10. :DSZ, then do the scan for duplicates, and pass the remaining packet
  11. :to the mail door for processing of the remaining messages.
  12.  
  13. :Start by running the real DSZ with all its parameters to get the packet.
  14. :Since DSZ.BAT is in the current sub-directory, we need to point to the
  15. :exact location where the real DSZ program resides.
  16. C:\BIN\DSZ %1 %2 %3 %4 %5 %6 %7 %8 %9
  17.  
  18. :After the REP packet is uploaded, extract the BBS_ID.REP packet putting it
  19. :into a temp sub-directory such as a RAM disk, scan it for duplicates, and
  20. :re-pack it into the REP packet. This prevents duplicate messages from
  21. :getting into your system.
  22. IF NOT EXIST D:\QWKFILES\BBS_ID.REP GOTO NOREP
  23. PKUNZIP -o D:\UPFILES\BBS_ID.REP BBS_ID.MSG D:\TEMPDIR
  24. KILLQDUP D:\TEMPDIR\BBS_ID.MSG -LOG:D:\LOGS\KILLQDUP.LOG -CF:MAILDOOR.CRC -COM:2
  25. IF ERRORLEVEL 1 GOTO NOREPDUPES
  26. PKZIP -m D:\UPFILES\BBS_ID.REP D:\TEMPDIR\BBS_ID.MSG
  27. GOTO REPDUPEFOUND
  28. :NOREPDUPES
  29. DEL D:\TEMPDIR\BBS_ID.MSG
  30. :REPDUPEFOUND
  31. DEL D:\TEMPDIR\BBS_ID.BAK
  32. :NOREP
  33.  
  34. :Now that the REP packet has been scanned for duplicates, return control to
  35. :the mail door and allow it to process the remaining messages.
  36.